namespace Digitalmes.Domain.Entities.Mes.Traceability;

/// <summary>
/// 报警项
/// </summary>
[SugarTable("trace_alarm_item")]
public sealed class TraceAlarmItem : AuditedEntity
{
    /// <summary>
    /// 警报产线 Id
    /// </summary>
    public int LineId { get; set; }

    /// <summary>
    /// 警报产线代码
    /// </summary>
    public string? LineCode { get; set; }

    /// <summary>
    /// 警报区域（不分区域可设为 null）
    /// </summary>
    /// <remarks>有多个工位采用一套 PLC 设备的，可设为设备名称（设备名称可采用区域命名）。</remarks>
    public string? Area { get; set; }

    /// <summary>
    /// 对应的数据索引（基数从 1 开始）
    /// </summary>
    public int Index { get; set; }

    /// <summary>
    /// 警报内容
    /// </summary>
    [NotNull]
    public string? Content { get; set; }

    /// <summary>
    /// 警报等级
    /// </summary>
    public int Level { get; set; }
}
